---
title: "Quickstart"
icon: "bolt"
description: "Build interactive data apps that run locally in the browser with Preswald"
---

<Steps>

  <Step title="Install the Preswald SDK">

```bash
pip install preswald

or 

uv pip install preswald
```

<Tip>Need the latest version? Upgrade anytime:</Tip>

```bash
pip install --upgrade preswald

or 

uv pip install --upgrade preswald
```

</Step>

  <Step title="Set Up Your First Project">

Run these commands to bootstrap your first Preswald app:

```bash
preswald init my_project
cd my_project
```

This will create a scaffolded project with the following:

- **`hello.py`**: Your main Python script where you'll write your app logic
- **`preswald.toml`**: Configuration for your app's metadata, runtime settings, and branding
- **`secrets.toml`**: Secure storage for sensitive data like API keys
- **`data/`**: Directory for your input data files
- **`images/`**: Directory for custom branding assets
- **`.gitignore`**: Pre-configured to exclude sensitive files from version control

</Step>

  <Step title="Write Your First App">

Open `hello.py` and edit it with the following content:

```python
from preswald import text, table, get_df

# Add a title
text("# Welcome to Preswald")

# Load and display data
df = get_df("data/sample.csv")
table(df)
```

This simple example demonstrates Preswald's key features:
- Python-based development with built-in UI components
- Direct data access with DuckDB integration
- Reactive updates powered by Pyodide in the browser

#### Run It Locally

Launch your app locally with this command:

```bash
preswald run
```

Open your browser and navigate to **[http://localhost:8501](http://localhost:8501)**. Your app will run entirely in the browser, with no server required.

</Step>

  <Step title="Export Your App">

When you're ready to share your app, export it as a static site:

```bash
preswald export
```

This creates a `dist/` folder containing your complete app, including:
- All Python code (bundled via Pyodide)
- Data files and DuckDB queries
- UI components and styling
- Everything needed to run offline in any modern browser

You can now share this folder directly or host it on any static hosting platform.

</Step>

</Steps>
